import { createWebHashHistory, createRouter } from "vue-router";

import Layout from "../pages/Main.vue";
import WaterCalendar from "../pages/waterCalendar/index.vue";
import Inherit from "../pages/inherit/index.vue";
import ContributionWall from "../pages/contributionwall/index.vue";
// import Login from "../pages/login/index.vue";
// import createOrder from "../pages/createOrder/index.vue";
// import detail from "../pages/detail/index.vue";

const routes = [
  {
    path: "/",
    component: Layout,
    redirect: "/WaterCalendar",
    children: [
      {
        path: "WaterCalendar",
        meta: {
          icon: "home-o",
          name: "水历",
        },
        component: WaterCalendar,
      },
      {
        path: "Inherit",
        meta: {
          icon: "envelop-o",
          name: "传承",
        },
        component: Inherit,
      },
      {
        path: "ContributionWall",
        meta: {
          icon: "user-circle-o",
          name: "贡献墙",
        },
        component: ContributionWall,
      },
    ],
  },
  // {
  //   path: "/login",
  //   name: "login",
  //   component: Login,
  // },
  // {
  //   path: "/createOrder",
  //   name: "createOrder",
  //   component: createOrder,
  // },
  // {
  //   path: "/detail",
  //   name: "detail",
  //   component: detail,
  // },
];

export default createRouter({
  history: createWebHashHistory(),
  routes,
});
